<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>购物车</title>
  <style>
    ul,
    li {
      margin: 0;
      padding: 0;
    }

    li {
      list-style: none;
    }

    .container {
      width: 400px;
      margin: 100px auto;
    }

    .add-box {
      display: flex;
    }

    #item-name {
      padding: 12px 8px;
      border: none;
      border-left: 7px solid #d9cfd3;
      background: #f2ecee;
      border-radius: 3px;
      cursor: pointer;
      font-weight: 600;
      text-align: center;
      outline: none;
      font-size: 16px;
      flex-grow: 1;
    }

    #item-name::placeholder {
      color: #d9cfd3;
    }

    .btn {
      font-size: 14px;
      font-weight: 600;
      padding: 10px 30px;
      border-radius: 3px;
      border: none;
      cursor: pointer;
      transition: background-color 0.2s ease;
      margin-left: 10px;
    }

    #btn-add {
      color: #fff;
      background-color: #1c6c9e;
    }

    #btn-delete {
      color: #000;
      background-color: #efefef;
    }

    #btn-add:hover {
      background-color: #124869;
    }

    #shopping-list li {
      display: flex;
      align-items: center;
      margin-top: 20px;
    }

    #shopping-list li p {
      flex-grow: 1;
    }
  </style>
</head>
<body>
  <div class="container">
    <h1>购物清单添加/删除</h1>
    <h4>消费名称</h4>
    <div class="add-box">
      <input id="item-name" type="text" placeholder="请输入购物名称">
      <button id="btn-add" class="btn">添加</button>
    </div>
    <ul id="shopping-list">
      <li>
          <p>项目名称</p> 
          <button id="btn-delete">删除</button>
      </li>
    </ul>
  </div>
</body>
</html>